com.cete.dynamicpdf.merger
Class MergeOptions
Example : The following example shows how to enter text in a text field specifying the MergeOptions.
import com.cete.dynamicpdf.*;
import com.cete.dynamicpdf.forms.*;
import com.cete.dynamicpdf.merger.*;
public class MyClass {
public static void main(String args[]) {
// Create a MergeOptions object to import the AcroForm
MergeOptions options = new MergeOptions( true );
// Create a merge document with your PDF containing form fields
MergeDocument document = new MergeDocument( "[physicalpath]/ImportPDF.pdf", options );
// Set the value of the text field equal to the string you want to appear
TextField text = (TextField)document.getForm().getTextFields().getTextField( 2 );
text.setValue("This is my text field");
// Save the PDF
document.draw( "[physicalpath]/MyDocument.pdf" );
}
}